import java.util.Date;
import java.util.HashSet;
import java.util.Scanner;

public class UserRegister {
    public static HashSet<User>USER_DATA=new HashSet<User>();

    public static void main(String[] args) {
        initDate();
        Scanner scan=new Scanner(System.in);
        System.out.println("请输入用户名");
        String userName=scan.nextLine();

        System.out.println("请输入密码");
        String password=scan.nextLine();

        System.out.println("请重复密码");
        String repassword=scan.nextLine();

        System.out.println("请输入出生日期");
        String birthday=scan.nextLine();

        System.out.println("请输入手机号码");
        String telNumber=scan.nextLine();

        System.out.println("请输入电子邮箱");
        String email=scan.nextLine();

        CheckInfo checkInfo=new CheckInfo(USER_DATA);
        String result=checkInfo.checkAction(userName, password, repassword,birthday, telNumber, email);
        System.out.println("注册结果："+result);
    }


    private  static void initDate(){
        User user=new User("薛之谦","zz,123",new Date(),"18810319240","zhangzhen@itcast.cn");
        User user2=new User("xq","zz,133",new Date(),"18610319240","zhanzhen@itcast.cn" );
        USER_DATA.add(user);
        USER_DATA.add(user2);
    }
}
